﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Core.Validation;
using MvcEngine.Core.Content;
using MvcEngine.Core.Website;
using MvcEngine.Core;
using MvcEngine.Core.Localization;
using MvcEngine.Mvc.Models.ViewModels;

namespace MvcEngine.Mvc.Models
{
    public class AccountViewModel : MvcEngineModel
    {
        [MvcEngineDisplayName("AccountEmailLabel")]
        [RequiredFieldValidator("EmailRequiredValidator")]
        [RegularExpressionValidator("EmailRegularExpressionValidator", "$EmailRegexExpression", true)]
        [LengthValidator("EmailLengthValidator", 256)]
        [UniqueUserNameValidator("EmailUniqueValidator")]
        public string Email { get; set; }

        [MvcEngineDisplayName("AccountPasswordLabel")]
        [RequiredFieldValidator("PasswordRequiredValidator")]
        [LengthValidator("MaxPasswordLengthValidator", 128)]
        [LengthValidator("MinPasswordLengthValidator", MinLength = 6, AllowEmpty = true)]
        public string Password { get; set; }

        [RequiredFieldValidator("PasswordConfirmRequiredValidator")]
        [MvcEngineDisplayName("AccountConfirmationPasswordLabel")]
        public string ConfirmationPassword { get; set; }

        [RequiredFieldValidator("FirstNameRequiredValidator")]
        [MvcEngineDisplayName("FirstNameLabel")]
        [LengthValidator("FirstNameLengthValidator", 256)]
        public string FirstName { get; set; }

        [RequiredFieldValidator("LastNameRequiredValidator")]
        [MvcEngineDisplayName("LastNameLabel")]
        [LengthValidator("LastNameLengthValidator", 256)]
        public string LastName { get; set; }

        [MvcEngineDisplayName("GenderLabel")]
        public bool Male { get; set; }

        [MvcEngineDisplayName("BirthdayLabel")]
        public DateTime Birthday { get; set; }
    }
}
